package com.hs.jhzd.entity;

import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

@Entity
@Data
@Table(name = "jh_Questionnaire")
//出所问卷调查类型表
public class Questionnaire {
    @Id
    private String id;
    private String prisonId;//监所编号
    private String name;//类型名称
    private String surveyType;// 调查类型
    private Date createTime;//创建时间
    @OneToMany(targetEntity=QuestionnaireQuestion.class,mappedBy="questionnaireId")
    private List<QuestionnaireQuestion> questions; //对应的题库

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPrisonId() {
        return prisonId;
    }

    public void setPrisonId(String prisonId) {
        this.prisonId = prisonId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSurveyType() {
        return surveyType;
    }

    public void setSurveyType(String surveyType) {
        this.surveyType = surveyType;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<QuestionnaireQuestion> getQuestions() {
        return questions;
    }

    public void setQuestions(List<QuestionnaireQuestion> questions) {
        this.questions = questions;
    }
}
